<f:view xmlns="http://www.w3.org/1999/xhtml" 
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:w="http://www.apusic.com/jsf/widget" 
		xmlns:layout="http://www.apusic.com/jsf/layout"
		xmlns:ajax="http://www.apusic.com/jsf/ajax"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:om="http://www.apusic.com/jsf/misc"
		xmlns:kd="http://www.kingdee.com/jsf/component"
		renderKitId="AJAX">
	<w:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />	
	         <META   HTTP-EQUIV="Pragma"   CONTENT="no-cache" />   
		 <META   HTTP-EQUIV="Cache-Control"   CONTENT="no-cache" />   
		 <META   HTTP-EQUIV="Expires"   CONTENT="0" />   
	  <w:script src="/resource/commonQuery.js"/>	
	  <script type="text/javascript" src="CommonQueryDialog.js"></script>
		<w:stylesheet src="/resource/common.css"/>
	  <link rel="stylesheet" type="text/css" href="#{skin.getSkinReourceURL('/widget/css/kdctrl.css')}"/>
		<style type="text/css">
		    .listSolution{float:left;width:155px;height:100%} 
		    .commonFilter{float:right;margin:0px;border:0px;}
        .content {
	          width:155px;
	          height:100%;
	          POSITION: absolute;
	          overflow-x:auto;
         }
         
         .spanSel{background:Highlight;	color:white;CURSOR: hand;}
         
         .spanCss {
	          float:left;
	          padding-left:2px;
	          width:100%;	
	          height:20px;
         }
		</style>
	</w:head>
	<w:page title="#{winlet.CommonQueryDialogNoFilterBean.title}" loadMask="true" prependId="false" styleClass="x-form">
	     
			<ajax:scripter script="#{winlet.CommonQueryDialogNoFilterBean.actionScript}"></ajax:scripter>	

			<div class="x-window-mc" style="margin:0px;width:648px;height:398px">
				<w:form style="margin:0px" id="queryDialog" onsuccess="ajaxSubmitOK();">
				  <w:toolBar>
						   <w:button value="新建" action="#{winlet.CommonQueryDialogNoFilterBean.addSolution}"
											   binding="#{winlet.CommonQueryDialogNoFilterBean.addSolutionBtn}"/>
						   <w:button value="保存" action="#{winlet.CommonQueryDialogNoFilterBean.saveSolution}"
											   binding="#{winlet.CommonQueryDialogNoFilterBean.saveSolutionBtn}"/>
						   <w:button value="另存" action="#{winlet.CommonQueryDialogNoFilterBean.saveAsSolution}"
											   binding="#{winlet.CommonQueryDialogNoFilterBean.saveAsSolutionBtn}"/>
						   <w:button value="删除" action="#{winlet.CommonQueryDialogNoFilterBean.removeSolution}"
											   binding="#{winlet.CommonQueryDialogNoFilterBean.removeSolutionBtn}" onclick="return confirm('您是否确认删除？');"/>
						   <w:button value="退出"  onclick="KD.commonQuery.doClose();"/>
		    	</w:toolBar>   
		    	<div style="clear:both;margin:0px;height:339px;">
				
		       <div class='listSolution  x-panel-body x-panel-body-noheader' >
		    		  
              <div class='content' id='listContainer'>
              </div>	
                <h:selectOneListbox id="selectSolutionList" size="20" style="VISIBILITY: hidden;width:0px; height:0px; background-color:White;"
		    							value="#{winlet.CommonQueryDialogNoFilterBean.selectedSolution}"
		    							ondblclick="OM.ajax.submit('queryDialog',null,null);"
		    							valueChangeListener="#{winlet.CommonQueryDialogNoFilterBean.valueChange}">
		    			    <f:selectItems value="#{winlet.CommonQueryDialogNoFilterBean.solutionList}"/>
                </h:selectOneListbox>
		    	 </div>	 	 
		    	 <div class='commonFilter'>
		    		  <layout:tabLayout jsvar='filterTabs' title="center" style="width:490px;height:339px;">	
		    		    <layout:columnLayout jsvar='filterTab1'  border="false" title="条件">					
		    		       <layout:panel style="border:0px" columnWidth="1." header="false" height="339">
		    		         <ajax:updater id="userFilterPanel" binding="#{winlet.CommonQueryDialogNoFilterBean.userPanel}"></ajax:updater>
		    		       </layout:panel>  
		    		    </layout:columnLayout>	 		 		
					    </layout:tabLayout>
				    </div>	   
				 </div> 	
                <table style="float:left;width:97%;margin:5px">
                	<tr>
                    	<td style="width:50px">
      						        <h:selectBooleanCheckbox id="chkDefaultSolution" style="display:none" 
      												 binding="#{winlet.CommonQueryDialogNoFilterBean.defaultSolutionCheckbox}" 
      												 value="#{winlet.CommonQueryDialogNoFilterBean.defaultSolution}"/>
                       </td>
      					       <td style="width:250px">
							           <h:outputLabel style="display:none" value="下次直接以该方案进入" for="chkDefaultSolution"/>
                    	</td>
                    	<td style="width:50px"/>
                    	<td style="width:240px; color: #FF0000">
                    		<h:outputText id="msgArea" value="#{winlet.CommonQueryDialogNoFilterBean.tipMessage}" style="width: 240px; color: #FF0000; text-align: center"/>
                    	</td>
                    	<td style="width:36px"/>
                    	<td>
      						      <w:button id="btnOK" value="确定" action="#{winlet.CommonQueryDialogNoFilterBean.doOK}"/>
      					      </td>
      					      <td>
        					       <w:button id="btnCancel" value="取消"  onclick="KD.commonQuery.doClose();return false;"/>
        				      </td>
        			     </tr>
                </table>      
  	     </w:form>
  		</div>
  
		  <layout:window id="solutionNameDialog"  binding="#{winlet.CommonQueryDialogNoFilterBean.solutionNameDialog}" 
    			  width="300" 
    			  height="150" 
    			  modal="true" 
    			  collapsible="false"
    			  resizable="false" 
    			  title="方案保存">  
    			 <ajax:updater id="solutionUpdate" binding="#{winlet.CommonQueryDialogNoFilterBean.solutionUpdate}"></ajax:updater>	
		  </layout:window> 
	</w:page> 
	
	<script type="text/javascript">
		//<![CDATA[	
			 Ext.onReady(function(){
			     window.init=function(){
			       var msg=document.getElementById('queryDialog:msgArea');
			       if (msg){
			         msg.innerText='';
			       }
			     }
			  
			     syncSolutionList();
			    // alert("coming");
			     if (window.pageOnLoad)window.pageOnLoad();
			 	   #{winlet.CommonQueryDialogBean.onLoadScript}
			  });
			   if(navigator.appName == "Microsoft Internet Explorer"){ 
					if(navigator.appVersion.match(/7./i)=='7.'){ 
						document.getElementById("listContainer").style.height="339px";
				} 
		}
		//]]>
	</script>		
</f:view> 